:root {
    --ui-bg: #0f172a;
    --ui-panel: #111827;
    --ui-soft: #1f2937;
    --ui-accent: #3b82f6;
    --ui-text: #e5e7eb;
    --ui-muted: #9ca3af;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial;
    color: var(--ui-text);
    background: linear-gradient(180deg, #0b1022, #0f172a 30%, #0b1022);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

header {
    padding: 16px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    font-size: 18px;
    margin: 0;
    font-weight: 600;
    letter-spacing: .2px
}

.container {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 18px;
    padding: 0 20px 20px;
    align-items: start
}

.panel {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    overflow: hidden;
}

.panel h2 {
    font-size: 14px;
    margin: 0;
    padding: 12px 14px;
    background: rgba(255, 255, 255, .04);
    border-bottom: 1px solid rgba(255, 255, 255, .06)
}

.panel .content {
    padding: 12px 14px;
    display: grid;
    gap: 12px
}

label {
    font-size: 12px;
    color: var(--ui-muted);
    display: block;
    margin-bottom: 4px
}

input[type="text"] {
    width: 100%;
    background: var(--ui-soft);
    color: var(--ui-text);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px
}

.btn {
    appearance: none;
    border: none;
    background: var(--ui-accent);
    color: white;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(59, 130, 246, .35);
}

.btn.secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .15);
    box-shadow: none
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed
}

.stage-wrap {
    padding: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stage {
    position: relative;
    width: 600px;
    /* ✅ largura fixa (preview) */
    background: #111827;
    border-radius: 14px;
    overflow: hidden;
    border: 1px dashed rgba(255, 255, 255, .12);
    aspect-ratio: 5 / 2;
    /* será ajustado ao PNG real */
    display: flex;
    align-items: center;
    justify-content: center;
}

.stage img {
    display: block;
    width: 100%;
    height: auto
}

.placeholder {
    position: absolute;
    color: #94a3b8;
    font-size: 14px
}

/* Overlays de texto fixas */
.overlay {
    position: absolute;
    left: 10%;
    top: 20%;
    color: #e5e7eb;
    user-select: none;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
    white-space: pre-wrap;
    max-width: 80%;
    cursor: default;
    pointer-events: none;
}

.small {
    font-size: 12px
}

.muted {
    color: #9aa3af
}

footer {
    padding: 0 20px 20px;
    color: #9aa3b2;
    font-size: 12px
}

@media (max-width: 980px) {
    .container {
        grid-template-columns: 1fr
    }
}

/* === Tutorial pós-download (modal) === */
.tutorial-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    display: none;
    /* abre via JS */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.tutorial-modal {
    width: min(920px, 96vw);
    background: #0b1222;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    box-shadow: 0 18px 80px rgba(0, 0, 0, .55);
    color: #e5e7eb;
    overflow: hidden;
}

.tutorial-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
    border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.tutorial-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
}

.tutorial-body {
    padding: 12px 16px;
    display: grid;
    gap: 16px;
}

.tutorial-steps {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
}

.tutorial-steps .left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tutorial-step {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
}

.tutorial-step.active {
    outline: 2px solid #3b82f6;
    background: rgba(59, 130, 246, .12);
}

.tutorial-step .dot {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: grid;
    place-items: center;
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    font-size: 12px;
    color: #93c5fd;
    font-weight: 700;
}

.tutorial-step .txt {
    font-size: 13px;
    line-height: 1.3;
    color: #e5e7eb;
}

.tutorial-viewport {
    background: #0a0f1a;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    overflow: hidden;
}

.tutorial-viewport img,
.tutorial-viewport video {
    max-width: 100%;
    height: auto;
    display: block;
}

.tutorial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .03);
}

.tutorial-actions {
    display: flex;
    gap: 8px;
}

.tutorial-btn {
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(59, 130, 246, .35);
}

.tutorial-btn.secondary {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, .15);
    box-shadow: none;
}

.tutorial-close {
    border: none;
    background: transparent;
    color: #cbd5e1;
    font-size: 18px;
    cursor: pointer;
}

@media (max-width: 900px) {
    .tutorial-steps {
        grid-template-columns: 1fr;
    }
}